package com.qf.api.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.qf.api.blog.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 文章表
 * @TableName t_article
 */
@TableName(value ="t_article")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class ArticleEntity extends BaseEntity {
    /**
     * 文章id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 文章标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 文章封面
     */
    @TableField(value = "cover")
    private String cover;

    /**
     * 文章摘要
     */
    @TableField(value = "summary")
    private String summary;

    /**
     * 作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 阅读数
     */
    @TableField(value = "visit_count")
    private Long visitCount;

    /**
     * 是否置顶 1 置顶 2 取消置顶
     */
    @TableField(value = "is_top")
    private Integer isTop;

    /**
     * 文章状态 1 公开 2 私密
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 文章类型 - 1：普通文章，2：收录于知识库
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 字数
     */
    @TableField(value = "word_count")
    private Integer wordCount;
}